"""hashed_password type bytes

Revision ID: 04df56785279
Revises: ecb681cdff62
Create Date: 2024-05-03 13:32:02.569917

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy import text

# revision identifiers, used by Alembic.
revision: str = '04df56785279'
down_revision: Union[str, None] = 'ecb681cdff62'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('Users', 'hashed_password',
               existing_type=sa.VARCHAR(length=128),
               type_=sa.LargeBinary(),
               existing_nullable=False,
               postgresql_using='hashed_password::bytea')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('Users', 'hashed_password',
               existing_type=sa.LargeBinary(),
               type_=sa.VARCHAR(length=128),
               existing_nullable=False,
               postgresql_using='hashed_password::varchar')
    # ### end Alembic commands ###
